<template>
  <div class="skeleton-waterfall">
    <div class="skeleton-column" v-for="col in 2" :key="col">
      <div 
        class="skeleton-item" 
        v-for="i in 4" 
        :key="i" 
        :style="{ height: `${200 + Math.random() * 100}px` }"
      >
        <div class="skeleton-image"></div>
        <div class="skeleton-content">
          <div class="skeleton-title"></div>
          <div class="skeleton-info">
            <div class="skeleton-avatar"></div>
            <div class="skeleton-text"></div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
// 无需 props 或其他逻辑
</script>

<style lang="scss" scoped>
.skeleton-waterfall {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 8px;

  .skeleton-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
  }

  .skeleton-image {
    width: 100%;
    height: 60%;
    background: #f5f5f5;
    animation: skeleton-loading 1.5s infinite;
  }

  .skeleton-content {
    padding: 12px;
  }

  .skeleton-title {
    height: 20px;
    background: #f5f5f5;
    margin-bottom: 12px;
    animation: skeleton-loading 1.5s infinite;
  }

  .skeleton-info {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .skeleton-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f5f5f5;
    animation: skeleton-loading 1.5s infinite;
  }

  .skeleton-text {
    flex: 1;
    height: 16px;
    background: #f5f5f5;
    animation: skeleton-loading 1.5s infinite;
  }
}

@keyframes skeleton-loading {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    opacity: 0.6;
  }
}
</style>

